<html>
<?php
    session_start();
    if($_SESSION['login']!='y'){
        $url = 'login.html';
        Header("Location: $url");
    }
    include('class.php');
    $db = new DB();
    $result = $db->getAllAssignment($_SESSION['name']);
?>

	<head>
		<link rel="stylesheet" href="bootstrap-theme.css">
		<link rel="stylesheet" href="bootstrap-theme.min.css">
		<link rel="stylesheet" href="bootstrap.min.css">
		<link rel="stylesheet" href="bootstrap.css">
		<link rel="stylesheet" href="DIY.css">
	</head>

	<body>
		<div class="container">
			<ul class="nav nav-tabs">
				<li role="presentation"><a href="Namelist.php">Staff Information</a></li>
				<li role="presentation"><a href="CheckAttendanceForManager.php">Check Attendance</a></li>
				<li role="presentation"><a href="AttendanceStatistics.php">Attendance Statistics</a></li>
				<li role="presentation"  class="active"><a href="DailyAssignment.php">Daily Assignment</a></li>
				<li role="presentation"><a href="BulletinForManager.php">Bulletin</a></li>
				<a class="logout" href="Logout.php">Log out</a>
				<label class="logout">Company Name</label>

			</ul>
			<div class="panel panel-default">

			</div>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">Assignment</h3>
				</div>
				<?php while($row = mysql_fetch_array($result)){ ?>
				<div class="panel-heading">
					<h3 class="panel-title">
						<?php echo $row['tid']?>&nbsp;&nbsp;&nbsp;Date
						<?php echo $row['date']?> &nbsp;&nbsp;&nbsp;Staff Name: &nbsp;
						<?php echo $row['sname']?>
						<div class="state">State:
							<?php echo $row['state']?>
						</div>
					</h3>
				</div>
				<div class="panel-body bulletin">
					<p>Details:&nbsp;&nbsp;&nbsp;
						<?php echo $row['content']?>
					</p>
				</div>
				<?php } ?>
			</div>
		</div>
	</body>

</html>
